package holdobject;

import java.util.*;

import static net.mindview.util.Print.print;

public class PrintingContainers {
    static Collection fill(Collection<String> collection){
        collection.add("rat");
        collection.add("cat");
        collection.add("dog");
        collection.add("dog");
        return collection;
    }
    static Map fill(Map<String,String> map){
        map.put("rat","r");
        map.put("cat","c");
        map.put("dog","d");
        map.put("dog","s");
        return map;
    }

    public static void main(String[] args) {
        print(fill(new ArrayList<String>()));
        print(fill(new LinkedList<String>()));
        print(fill(new HashSet<String>()));
        print(fill(new TreeSet<>()));
        print(fill(new LinkedHashSet<>()));
        System.out.println();
        print(fill(new HashMap<String,String>()));
        print(fill(new TreeMap<>()));
        print(fill(new LinkedHashMap<>()));

    }
}
